package com.ml.mall.entity.banner;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @author :pl
 * @version :1.0
 * @description :banner实体类
 * @date :2021/5/21
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "sys_banner")
public class SysBanner {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @TableField(value = "create_at",fill = FieldFill.INSERT)
    private Date createAt;

    /**
     * 更新时间
     */
    @TableField(value = "update_at",fill = FieldFill.INSERT_UPDATE)
    private Date updateAt;

    /**
     * 逻辑删除
     */
    @ApiModelProperty(value = "是否删除")
    @TableField(value = "is_delete",fill = FieldFill.INSERT)
    @TableLogic(value = "0",delval = "1")
    private Integer isDelete;

    /**
     * 图片链接字符串
     */
    @TableField(value = "pic_url")
    private String picUrl;

    /**
     * 重定向链接
     */
    @TableField(value = "link_url")
    private String linkUrl;

    /**
     * 排序
     */
    @TableField(value = "index_no")
    private Integer indexNo;

    /**
     * 点击量
     */
    @TableField(value = "click_num",fill = FieldFill.INSERT)
    private Integer clickNum;

    /**
     * 标题
     */
    @TableField(value = "tittle")
    private String title;

    /**
     * 状态：0表示有效，1表示无效
     */
    @TableField(value = "state",fill = FieldFill.INSERT)
    private Integer state;

    /**
     * 链接类型，0：title ， 1：到商家 ， 2：到目录 ， 3：到产品
     */
    @TableField(value = "url_type")
    private Integer urlType;
}
